<template>
 <!-- <div class="block">
    <span class="demonstration">完整功能</span>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage4"
      :page-sizes="[100, 200, 300, 400]"
      :page-size="100"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div> -->
   <div class="block">
    <!-- <span class="demonstration">直接前往</span> -->
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page.sync="currentPage3"
      :page-size="100"
      layout="prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div>
</template>

<script>
export default {
     props:['total'],
     methods: {
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
        // val传给父组件page
        this.$parent.pageSize = val
        // 刷新表格
        this.$emit('resetPageFun')
        
      },
      // 页面
      handleCurrentChange(val) {
        console.log(`当前页: ${val}`);
        // val传给父组件page
        this.$parent.page = val
        // 刷新表格
        this.$emit('resetPageFun')
      }
    },
    data() {
      return {
        currentPage3: 1
      };
    }

}
</script>

<style lang="less" scoped>
.block{
    display: flex;
    justify-content: center;
}

</style>